package cn.jdy.plugins.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import cn.jdy.common.bo.BaseEntry;

/**
 * @desc   红包(领取记录)
 * @author lutan
 * @date   2017-4-10
 */
@Entity
public class RedPacketReceive extends BaseEntry implements Serializable {
	private static final long serialVersionUID = 1996535695280105630L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	// 根据数据库自动适配 mysql默认自增
	private Long id; // 主键
	private Long liveId;// 直播id，关联直播信息表
	private Long rpSendId;//红包id，关联红包发放表
	private String watchUserId;//用户id，关联直播观看用户表
	private String watchUsername;//用户名称
	private String watchUserHeadImg;  //用户头像
	private String receiveMoney;//红包金额
	
	@ManyToOne
	@JoinColumn(name = "liveId", insertable = false, updatable = false)
	//redPacketReceive表 liveId 外键关联live表的id
	private Live live;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Long getLiveId() {
		return liveId;
	}
	public void setLiveId(Long liveId) {
		this.liveId = liveId;
	}
	public Long getRpSendId() {
		return rpSendId;
	}
	public void setRpSendId(Long rpSendId) {
		this.rpSendId = rpSendId;
	}
	public String getWatchUserId() {
		return watchUserId;
	}
	public void setWatchUserId(String watchUserId) {
		this.watchUserId = watchUserId;
	}
	public String getReceiveMoney() {
		return receiveMoney;
	}
	public void setReceiveMoney(String receiveMoney) {
		this.receiveMoney = receiveMoney;
	}
	public String getWatchUsername() {
		return watchUsername;
	}
	public void setWatchUsername(String watchUsername) {
		this.watchUsername = watchUsername;
	}
	public String getWatchUserHeadImg() {
		return watchUserHeadImg;
	}
	public void setWatchUserHeadImg(String watchUserHeadImg) {
		this.watchUserHeadImg = watchUserHeadImg;
	}
	public Live getLive() {
		return live;
	}
	public void setLive(Live live) {
		this.live = live;
	}
	
	
}